import Vue from "vue";
import VueRouter from "vue-router";
import Login from '../views/login'

Vue.use(VueRouter);

const routes = [
  // pc端
  { path: "/", meta: { title: '首页' }, redirect: "/login" },
  { path: "/login", meta: { title: '登录页面' }, component: Login },

  { path: "/index", meta: { title: 'index' }, component: () => import('../views/index') },
  { path: "/components/flex", meta: { title: 'flex学习' }, component: () => import('../views/components/flex') },
  { path: "/components/watermark", meta: { title: 'watermark水印' }, component: () => import('../views/components/watermark') },
  { path: "/components/test", meta: { title: '测试' }, component: () => import('../views/components/test') },
  { path: "/components/attendance", meta: { title: '考勤' }, component: () => import('../views/components/attendance') },
  { path: "/components/bilibili", meta: { title: 'B站' }, component: () => import('../views/components/bilibili') },
  { path: "/components/ts", meta: { title: 'ts' }, component: () => import('../views/components/ts') },
  { path: "/components/structure", meta: { title: 'structure' }, component: () => import('../views/components/structure') },

  // 移动端
  { path: "/components/app", meta: { title: 'app' }, component: () => import('../views/components/app') },


  

];

const router = new VueRouter({
  mode: "history",
  routes,
});

export default router;

